package cn.xxm.strategy.pay.i18n.response;

/**
 * 公共响应信息
 */
public enum CommonResponseInfo implements ResponseInfo {
	/** 0000000-success：交易成功 **/
	SUCCESS("000000", "success"),
	/** 0000001-failed：系统繁忙，请稍后再试 **/
	FAILED("000001", "failed"),
	/** 000002-sessionTimeout：会话超时，请重新登录 **/
	SESSION_TIMEOUT("000002", "sessionTimeout"),
	/** 000003-paramError：参数错误 **/
	PARAM_ERROR("000003", "paramError"),
	/** 000004-otherLogin：您的账号在其他地点登录，您被强制下线 **/
	OTHER_LOGIN("000004", "otherLogin"),
	/** 000005-notLogin：您的账号尚未登录，请先登录 **/
	NOT_LOGIN("000005", "notLogin"),
	/** 000006-requestError：请求异常 **/
	REQUEST_ERROR("000006", "requestError"),
	/** 000007-requestStoped：请求接口已关闭，无法访问 **/
	REQUEST_STOPED("000007", "requestStoped"),
	/** 000008-requestAuthFail：没有权限访问该接口 **/
	REQUEST_AUTH_FAIL("000008", "requestAuthFail"),
	/** 000009-requestException：服务异常 **/
	REQUEST_EXCEPTION("000009", "requestException"),
	/** 000010-branschRespError：分支流程异常 **/
	BRANCH_RESP_ERROR("000010", "branschRespError"),
	/** 000011-overtimeRequest：过期的请求 **/
	OVERTIME_REQUEST("000011", "overtimeRequest"),
	/** 000012-failAccountSercurity：账户安全验证失败 **/
	FAIL_ACCOUNT_SERCURITY("000012", "failAccountSercurity"),
	/** 000013-newVersion：发现新版本，请更新体验 **/
	NEW_VERSION("000013", "newVersion"),
	/** 000014-conflictVersion：版本冲突 **/
	CONFLICT_VERSION("000014", "conflictVersion"),
	/** 000015-ipNumExceedLimit：该IP注册超过最大次数 **/
	IP_NUM_EXCEED_LIMIT("000015", "ipNumExceedLimit"),
	/** 000016-duplicateRequest：重复的请求 **/
	DUPLICATE_REQUEST("000016", "duplicateRequest"),
	/** 000017-rejectRequest：请求被拒绝 **/
	REJECT_REQUEST("000017", "rejectRequest"),
	/** 000018-unknownDevices：设备登录异常 **/
	UNKNOWN_DEVICES("000018", "unknownDevices"),
	/** 000019-securityValidateError：接口安全验证失败 **/
	SECURITY_VALIDATE_ERROR("000019", "securityValidateError"),
	/** 000020-unknownError：未知错误 **/
	UNKNOWN_ERROR("000020", "unknownError"),
	/** 000021-accountRisk：账户存在风险 **/
	ACCOUNT_RISK("000021", "accountRisk"),
	/** 000022-deviceNumExceedLimit：该设备注册超过最大次数 **/
	DEVICE_NUM_EXCEED_LIMIT("000022", "deviceNumExceedLimit"),
	/** 000023-paramCheckFail：参数验证失败 **/
	PARAM_CHECK_FAIL("000023", "paramCheckFail"),
	/** 000024-publicKeyNull：公钥为空 **/
	PUBLICKEY_NULL("000024", "publicKeyNull"),
	/** 000025-publicKeyNumberErr：公钥数量错误 **/
	PUBLICKEY_NUMBER_ERR("000025", "publicKeyNumberErr"),
	/** 000026-thirdServiceConfigNotExists：第三方接口服务配置不存在 **/
	THIRD_SERVICE_CONFIG_NOT_EXISTS("000026", "thirdServiceConfigNotExists"),
	/** 000027-invokeServiceException：调用服务异常 **/
	INVOKE_SERVICE_EXCEPTION("000027", "invokeServiceException"),
	/** 0-paicSuccess：PAIC交易成功 **/
	PAIC_SUCCESS("0", "paicSuccess"),
	/** 300030-failGetUserInfo：获取用户信息失败 **/
	FAIL_GET_USERINFO("300030", "failGetUserInfo"),
	/** 000028-queryEmpty：查询记录为空 **/
	QUERY_EMPTY("000028", "queryEmpty"),
	NO_PERMISSION_FOR_ID_CARD_TODO("000029", "no_permission_for_id_card_todo"),
	/** 0-paicSuccess：PAIC交易成功 **/
	SSO_SUCCESS("000000", "ssoSuccess")
	;



	private String code;
	private String msg;

	private CommonResponseInfo(String code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	@Override
	public String getCode() {
		return code;
	}

	@Override
	public String getMsg() {
		return msg;
	}

	@Override
	public String toString() {
		StringBuffer strBuf = new StringBuffer();
		strBuf.append("{code:");
		strBuf.append(getCode());
		strBuf.append(",msg:");
		strBuf.append(FSResponseModel.getI18nMsg(this));
		strBuf.append("}");
		return strBuf.toString();
	}
}
